Java 7 Concurrency Cookbook by Unknown
Author:Unknown
Language: eng
Format: epub
Publisher: Packt Publishing
There's more...
The CompletionService class can execute Callable or Runnable tasks. In this example, you have used Callable, but you could also send Runnable objects. Since Runnable objects don't produce a result, the philosophy of the CompletionService class doesn't apply in such cases.
This class also provides two other methods to obtain the Future objects of the finished tasks. These methods are as follows:
poll(): The version of the poll() method without arguments checks if there are any Future objects in the queue. If the queue is empty, it returns null immediately. Otherwise, it returns its first element and removes it from the queue.
take(): This method, without arguments, checks if there are any Future objects in the queue. If it is empty, it blocks the thread until the queue has an element. When the queue has elements, it returns and deletes its first element from the queue.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12720)
Hello! Python by Anthony Briggs(10020)
The Mikado Method by Ola Ellnestam Daniel Brolund(9893)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9890)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(9864)
Dependency Injection in .NET by Mark Seemann(9432)
Hit Refresh by Satya Nadella(8878)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8402)
The Kubernetes Operator Framework Book by Michael Dame(8031)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7848)
Exploring Deepfakes by Bryan Lyon and Matt Tora(7818)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7817)
Grails in Action by Glen Smith Peter Ledbrook(7787)
Practical Computer Architecture with Python and ARM by Alan Clements(7770)
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(7731)
Robo-Advisor with Python by Aki Ranin(7721)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7668)
Building Low Latency Applications with C++ by Sourav Ghosh(7619)
Svelte with Test-Driven Development by Daniel Irvine(7607)
